#pragma once
#include "SnRender.h"
#include "base/SnImage.h"
#include "base/shader.h"
#include <memory>
#include <vector>
namespace Sivin {
  class TextureRender : public SnRender {
  public:
    explicit TextureRender();
    ~TextureRender();

  public:
    void onGLInit() override;
    void onRender() override;

  private:
    void initVAO();
    void initTexture();

  private:
    std::unique_ptr<Shader> mShader{nullptr};
    GLuint mVAO;
    std::vector<GLfloat> mPositionVertexData;
    std::vector<GLfloat> mColorVertexData;
    std::vector<GLuint> mElementIndexArray;
    std::vector<GLfloat> mTextureCoord;
    GLuint mTextureId{0};
  };
}// namespace Sivin